using CodeSnippet.Formats.Base;

namespace CodeSnippet.Formats
{
    /// <summary>
    /// Provides a base class for formatting languages similar to SQL.
    /// </summary>
    public abstract class SqlLikeFormat : CodeFormat
    {
        #region Properties
        /// <summary>
        /// Regular expression string to match single line comments (--) and multi-line 
        /// comments (// and /* */).
        /// </summary>
        protected override string CommentRegex
        {
            get { return @"((?:--\s)|(/\*.*?\*/|//)).*?(?=\r|\n)"; }
        }
        /// <summary>
        /// Regular expression string to match string literals. 
        /// </summary>
        protected override string StringRegex
        {
            get { return @"''|'.*?'"; }
        }
        /// <summary>
        /// Returns <b>false</b>, since T-SQL is not case sensitive.
        /// </summary>
        public override bool CaseSensitive
        {
            get { return false; }
        }
        #endregion Properties
    }
}
